﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using MedicLibrary.Controler;
using MedicLibrary.Model;
using MedicLibrary.View;

namespace MedicLibrary
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void danhSáchThuốcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            View.frmDSThuoc a = new View.frmDSThuoc();
            a.MdiParent = this;
            a.applyAction("LIST");
            a.Show();
        }

        private void danhSáchNhómThuốcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDSNhomThuoc frmDSNT = new frmDSNhomThuoc();
            frmDSNT.MdiParent = this;
            frmDSNT.applyAction("LIST");
            frmDSNT.Show();
        }

        private void thêmNhómThuốcMớiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmChiTietHoatChat frmCTNT = new frmChiTietHoatChat();
            frmCTNT.MdiParent = this;
            frmCTNT.applyAction("ADD");
            frmCTNT.Show();
           
        }

             
        private void ứngDụngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }

        private void thêmThuốcMớiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmChiTietThuoc frmctThuoc = new frmChiTietThuoc();
            frmctThuoc.MdiParent = this;
            frmctThuoc.Show();
        }

        private void tươngTácToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmTuongTac frmTT = new frmTuongTac();
            frmTT.MdiParent = this;
            frmTT.Show();
        }

        private void thêmTươngTácToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmTuongTac frmTT = new frmTuongTac();
            frmTT.MdiParent = this;
            frmTT.Show();
        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void trợGiúpToolStripMenuItem_Click(object sender, EventArgs e)
        {
           
        }

        private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (MessageBox.Show("Bạn thật sự muốn thoát khởi chương trình !", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.No)
            {
                e.Cancel = true;
            }
        }

        private void danhSáchHãngToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDSHangSX frmDSH = new frmDSHangSX();
            frmDSH.MdiParent = this;
            frmDSH.applyAction("LIST");
            frmDSH.Show();
        }

        private void danhSáchHoạtChấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDSHoatChat frmDSHC = new frmDSHoatChat();
            frmDSHC.MdiParent = this;
            frmDSHC.applyAction("LIST");
            frmDSHC.Show();
        }

        private void thêmQuốcGiaMớiToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmQuocGia frmDSHC = new frmQuocGia();
            frmDSHC.MdiParent = this;
            frmDSHC.Show();
        }

        
    }
}
